package com.lagou.product_springcloud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lagou.product_springcloud.pojo.Products;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

public interface ProductsMapper extends BaseMapper<Products> {

    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    @Insert("insert into products(`name`, price, flag, goods_Desc, " +
            "images, goods_Stock, goods_Type) " +
            "values(#{name}, #{price}, #{flag}, #{goods_Desc}," +
            "#{images}, #{goods_Stock}, #{goods_Type})")
    Integer insertProduct(Products products);
}
